package com.eascs.demand.entity;

import java.util.Date;

import com.eascs.web.sso.UserHolder;

public class EntityUtil {
	public static void initUpdateEntity(UpdateEntity updateEntity) {
		updateEntity.setUpdateDate(new Date());
		updateEntity.setUpdator(UserHolder.getUser().getCode());
	}

	public static void initInsertEntity(InsertEntity insertEntity) {
		insertEntity.setCreateDate(new Date());
		insertEntity.setCreator(UserHolder.getUser().getCode());
		EntityUtil.initUpdateEntity(insertEntity);
	}

}
